(define (eval exp env)
  (cond ((self-evaluating? exp) exp)
        ((quote? exp) (text-of-quotation exp))
        ((assignment? exp) (eval-assignment exp env))
        ((definition? exp) (eval-definition exp env))
        ((if? exp) (eval-if exp env))
        ((and? expr) (eval-and (and-clauses expr) env)) 
        ((or? expr) (eval-or (or-clauses expr) env)) 
        ((lambda? exp)
         (make-procedure (lambda-parameters exp)
                         (lambda-body exp)
                         env))
        ((begin? exp)
         (eval-sequence (begin-actions exp) env))
        ((cond? exp) (eval (cond-if exp) env))
        ((application? exp)
         (apply (eval (operator exp) env)
                (list-of-values (operands exp) env)))
        (else
          (error "Unknown expression type -- EVAL" exp))))


(define (and? expr) (tagged-list? expr 'and)) 

(define (and-clauses expr) (cdr expr)) 

(define (eval-and exprs env) 
  (let ((v (evaln (first-exp exprs) env))) 
    (cond ((last-exp? exprs)  
           (if v v #f)) 
          (else 
            (if v 
              (eval-and (rest-exps exprs) env) 
              #f))))) 

(define (or? expr) 
  (tagged-list? expr 'or)) 

(define (or-clauses expr) 
  (cdr expr)) 

(define (eval-or exprs env) 
  (let ((v (evaln (first-exp exprs) env))) 
    (cond ((last-exp? exprs) 
           (if v #t #f)) 
          (else 
            (if v 
              #t 
              (eval-or (rest-exps exprs) env)))))) 

